﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;
using DALHelper.Business;
using DALHelper.DAL;
using System.Data.SqlClient;

namespace ResortManager
{
    /// <summary>
    /// Interaction logic for wndTest.xaml
    /// </summary>
    public partial class wndTest : Window
    {
        public wndTest()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, RoutedEventArgs e)
        {
            BusinessManager bus = new BusinessManager();
            Transaction t = new Transaction();
            //t.Representer = "LMQ";
            //t.UserName = "";
            //t.TransactionID = 11;
            //t.Password = "";
            //t.StartTime = new DateTime(2009, 7, 1, 13, 0, 0);
            //t.EndTime = new DateTime(2009, 7, 5, 11, 0, 0);

            try
            {
                //bus.Transaction.AddTransaction(t);
                //t.UserName = null;
                //bus.Transaction.UpdateTransaction(t);
                //bus.Transaction.RemoveTransaction(11);
            }
            catch (SqlException ex)
            {
                MessageBox.Show(ex.Message);
            }
            catch(Exception exc)
            {
                MessageBox.Show(exc.Message);
            }
        }

        private void Exit_Click(object sender, RoutedEventArgs e)
        {
            this.Close();
        }
    }
}
